library(readxl)
Japan <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Yemen/Japan.xlsx")
View(Japan)
# Importing Data
JAPAN <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Yemen/Japan.xlsx")
# Creating Time Series Data
JAPAN_ts <- ts(JAPAN, start=c(2001,02), end=c(2019,06), frequency=12)
# Viewing and Checking the Created Time Series Data
JAPAN_ts
sum(is.na(JAPAN_ts))
library(forecast)
JAPAN_ts <- tsclean(JAPAN_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(JAPAN_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
JAPAN_ts_model <- auto.arima(JAPAN_ts)
JAPAN_ts_model
# Forecasting
options(max.print=1000000)
library(forecast)
JAPAN_ts_forecast <- forecast (JAPAN_ts_model, level=c(95), h=258)
plot(JAPAN_ts_forecast)
JAPAN_ts_forecast
write.table(JAPAN_ts_forecast, file="Japan_TSA.csv", sep=",")
# Importing Data
KOREA <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Yemen/Korea.xlsx")
# Creating Time Series Data
KOREA_ts <- ts(KOREA, start=c(2008,01), end=c(2019,07), frequency=12)
# Viewing and Checking the Created Time Series Data
KOREA_ts
sum(is.na(KOREA_ts))
library(forecast)
KOREA_ts <- tsclean(KOREA_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(KOREA_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
KOREA_ts_model <- auto.arima(KOREA_ts)
KOREA_ts_model
# Forecasting
options(max.print=1000000)
library(forecast)
KOREA_ts_forecast <- forecast (KOREA_ts_model, level=c(95), h=257)
plot(KOREA_ts_forecast)
KOREA_ts_forecast
write.table(KOREA_ts_forecast, file="Korea_TSA.csv", sep=",")
# Importing Data
USA <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Yemen/USA.xlsx")
# Creating Time Series Data
USA_ts <- ts(USA, start=c(2005,01), end=c(2019,07), frequency=12)
# Viewing and Checking the Created Time Series Data
USA_ts
sum(is.na(USA_ts))
library(forecast)
USA_ts <- tsclean(USA_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(USA_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
USA_ts_model <- auto.arima(USA_ts)
USA_ts_model
# Forecasting
options(max.print=1000000)
library(forecast)
USA_ts_forecast <- forecast (USA_ts_model, level=c(95), h=257)
plot(USA_ts_forecast)
USA_ts_forecast
write.table(USA_ts_forecast, file="USA_TSA.csv", sep=",")
